package com.atguigu.ssyx.common.config;

/**
 * @author 杨林
 * @create 2023-08-04 10:25 星期五
 * description:
 */

import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * mq消息转换器
 */
@Configuration
public class MQConfig {


    /**
     * 将要发送的消息转换成Json格式
     * @return
     */
    @Bean
    public MessageConverter messageConverter(){
        return new Jackson2JsonMessageConverter();
    }
    
}
